﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ManagementEditorial.aspx.cs" Inherits="ElectronicJournal.Admin.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:SqlDataSource ID="SqlDataSourceEditorial" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
        SelectCommand="SELECT * FROM ManagmentEditorial"
        UpdateCommand="UPDATE ManagmentEditorial SET description = @Description , fio = @FIO WHERE id_editorial = @id_editorial"
        InsertCommand="INSERT INTO ManagmentEditorial (Description, FIO) VALUES (@description, @fio)">
        <InsertParameters>
            <asp:Parameter Name="description" Type="String" />
            <asp:Parameter Name="fio" Type="String" />
    
        </InsertParameters>
    </asp:SqlDataSource>
                  <div  id="UsersRolesPanel">
                    <asp:GridView ID="UsersInRolesGridView" runat="server" 
                    DataSourceID="SqlDataSourceEditorial" AutoGenerateColumns="False" CellPadding="1" 
                        CellSpacing="1" DataKeyNames="id_editorial">
                        <AlternatingRowStyle BackColor="White" />
                        <FooterStyle BackColor="#009999" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#009999" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#EFF3FB" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        <Columns>

                            <asp:BoundField DataField="description" SortExpression="name" HeaderText="Описание"/>
                            <asp:BoundField DataField="FIO" SortExpression="width" HeaderText="ФИО" />

                            <asp:CommandField ShowEditButton="true" EditText="Изменить" UpdateText="Применить" CancelText="Отмена" />
                        </Columns>
                    </asp:GridView>

                  

  <table>
    <tbody>
        <tr>
            <td>
                Описание:
            </td>
            <td>
                <asp:TextBox ID="DescriptionTextBox" runat="server" Width="300px" />
            </td>
        </tr>
        <tr>
            <td>
                ФИО:
            </td>
            <td>
                <asp:TextBox ID="FIOTextBox" runat="server" Width="300px" />
            </td>
        </tr>

        <tr>
            <td>
                <asp:Button ID="Button1" runat="server" Text="Добавить" OnClick="AddEditor" />
            </td>
        </tr>
    </tbody>
</table>


</asp:Content>
